

def insert_sort(lis):
    for i in range(len(lis)-1):
        cur_num,pre_index = lis[i+1],i
        while pre_index>=0 and cur_num<lis[pre_index]:
            lis[pre_index+1] = lis[pre_index]
            pre_index -= 1
        lis[pre_index+1] = cur_num
    return lis

print(insert_sort([5,4,3,2,1,6,7,8,9,10]))



